<style>
    .input-notice{
        color: #4e73df;
        margin-top: 5px;
        display: block;
    }
</style>
<form id="stockshow-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="panel panel-default panel-intro">

        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">范围配置</label>
                    <div class="col-xs-12 col-sm-8">
                        <dl class="fieldlist" data-name="row[stock_show]" data-template="testtpl">
                            <dd>
                                <ins>起始数量</ins>
                                <ins>结束数量</ins>
                                <ins>显示内容</ins>
                            </dd>
                            <dd>
                                <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                            </dd>
                            <textarea name="row[stock_show]" class="form-control hide" cols="30" rows="5">{$stock_show}</textarea>
                        </dl>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">启用:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input  id="c-switch" name="row[stock_show_switch]" type="hidden" value="{$stock_show_switch}">
                        <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0" >
                            <i class="fa fa-toggle-on text-success fa-2x {eq name='$stock_show_switch' value='0'}fa-flip-horizontal text-gray{/eq}"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>





    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<!--定义模板-->
<script type="text/html" id="testtpl">
    <dd class="form-inline">
        <input type="text" name="row[<%=name%>][<%=index%>][less]" class="form-control" value="<%=row['less']%>" size="6">
        <input type="text" name="row[<%=name%>][<%=index%>][greater]" class="form-control" value="<%=row['greater']%>" size="6">
        <input type="text" name="row[<%=name%>][<%=index%>][content]" class="form-control" value="<%=row['content']%>" size="10">
        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
    </dd>
</script>
